# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Danct12 <danct12@disroot.org>
# Co-Maintainer: Stefan Hansson <newbyte@postmarketos.org>
pkgname=device-pine64-pinetab2
pkgdesc="Pine64 PineTab 2"
pkgver=1
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	mesa-egl
	postmarketos-base
"
makedepends="devicepkg-dev"
_pmb_recommends="firmware-bestechnic-bes2600"
subpackages="
	$pkgname-kernel-v0:kernel_v0
	$pkgname-kernel-v2:kernel_v2
	"
source="deviceinfo"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_v0() {
	pkgdesc="Kernel for PineTab 2 Dev Units"
	depends="linux-pine64-pinetab2"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_v2() {
	pkgdesc="Kernel for PineTab 2 Early Adopter"
	depends="linux-pine64-pinetab2"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="
f7276063471115fe873b90cd1e21c06e74a167ae278c3a91b1587b6174c8a08daa85a00b8470f0deac896729dfba090d2843d8b31d01e5c56fb69a01001502b6  deviceinfo
"
